﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="View.aspx.vb" Inherits="shassan6.View" %>

<%@ Register src="Webcontrols/Banner.ascx" tagname="Banner" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" >

  <!-- http://i-aspnet.stca.herts.ac.uk/tutorial12.html - ASP Tutorial - Code Reference --> 
   <head> 
   <title>View</title> 
   <link href="Styles/Site.css" rel="stylesheet" type="text/css" media="all" />
   </head> 

   <body>
    <uc1:Banner ID="Banner1" runat="server" />
    <form id="form1" runat="server">
    <div class="dataList">

    <asp:DataList id="dataList"  runat="server" RepeatDirection="Horizontal" border="0" >
     
        <ItemTemplate> 
        <asp:Image ID="Image1" ImageURL='<%#Container.DataItem("ImageURL")%>' Height="111px" style="margin-bottom: 0px" Width="172px" runat="server" />    

                <a href='view.aspx?id=<%#DataBinder.Eval(Container.DataItem,"RestaurantID") %>'><%#Container.DataItem("Title")%></a>
            
            </ItemTemplate>
    </asp:DataList>
    </div>
    <div class="dataList">
    <asp:DataList id="dataListComment"  runat="server" RepeatColumns="1" RepeatDirection="Horizontal" border="0" >
     
       
        <ItemTemplate> 
        <div style="margin-left:10px">
        <%#Container.DataItem("UserName")%></div> <br />
        <div style="margin-left:20px">
        <%#Container.DataItem("CommentTitle")%> <br />

        <%#Container.DataItem("CommentBody")%>
        </div><br />--------------------------------
            
            </ItemTemplate>
        
        
    </asp:DataList>
    </div>
    
     <p style="color:Blue">Comments:</p>
    <div class="comment" style="height:20px">
    <table>
    <tr>
        <td>Title</td>
        <td>
            <asp:TextBox ID="TbTitle" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="TitleRequired" runat="server" ControlToValidate="TbTitle" 
                CssClass="failureNotification" ErrorMessage="Title is required." ToolTip="Title is required." 
                ValidationGroup="CommentValidationGroup">*</asp:RequiredFieldValidator>
            </td>
    </tr>
     <tr>
        <td>Body</td>
        <td><asp:TextBox ID="TbBody" runat="server"  TextMode="MultiLine" Height="100px" Rows="10"></asp:TextBox>
        <asp:RequiredFieldValidator ID="BodyRequired" runat="server" ControlToValidate="TbBody" 
                CssClass="failureNotification" ErrorMessage="Comment Body is required." ToolTip="Comment Body is required." 
                ValidationGroup="CommentValidationGroup">*</asp:RequiredFieldValidator>
            
        </td>
    </tr>
    <tr>
        <td></td>
        <td>
            <asp:Button ID="BtAdd" runat="server" Text="Add"  ValidationGroup="CommentValidationGroup"/>
            </td>
    </tr>
    <tr>
        <td></td>
        <td>
            <asp:Label ID="LbResult" runat="server"></asp:Label>
            </td>
    </tr>
    </table>
    </div>
    </form>
</body>
</html>
